package com.xinchuang.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinchuang.entity.api.OaUserParam;
import com.xinchuang.mapper.OaUserMapper;
import com.xinchuang.service.OaUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author zkwczx
 * @version 1.0
 * @date 2023/12/21 10:10
 */
@Service
public class OaUserServiceImpl extends ServiceImpl<OaUserMapper, OaUserParam> implements OaUserService {

    @Override
    public String getOaUserName(String id) {
        if (!StringUtils.isNumeric(id)) {
            return "";
        }
        OaUserParam userParam = getById(id);
        if (ObjectUtil.isNotEmpty(userParam)) {
            return userParam.getName();
        }
        return "";
    }

}
